package cn.com.taurus.biz;

import cn.com.taurus.entity.AutomaticPlan;
import cn.com.taurus.mapper.AutomaticPlanMapper;
import cn.com.taurus.service.AutomaticPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * @author xf
 * @createTime 2021-6-29 16点54分
 * @remark 实现层
 * @version 1.0
 */
@Repository
public class AutomaticPlanBiz implements AutomaticPlanService {
    @Autowired(required=false)
    //在使用@Autowired注解的时候，默认required=true,表示注入的时候bean必须存在，否则注入失败。
    private AutomaticPlanMapper automaticPlanMapper;

    /**
     * 添加
     * @param automaticPlan
     * @return
     */
    @Override
    public int addAutomaticPlan(AutomaticPlan automaticPlan) {
        return automaticPlanMapper.addAutomaticPlan(automaticPlan);
    }

    /**
     * 修改
     * @param apMoney
     * @return
     */
    @Override
    public int updateAutomaticPlan(String apMoney) {
        return automaticPlanMapper.updateAutomaticPlan(apMoney);
    }

    /**
     * 删除
     * @param apid
     * @return
     */
    @Override
    public int deleteAutomaticPlan(Integer apid) {
        return automaticPlanMapper.deleteAutomaticPlan(apid);
    }
}
